/**
 * Created by Administrator on 2018/12/25.
 */

const myFilters = {
  imgPathFilter: function(img) {
    let baseUrl = 'https://youhuiniu.oss-cn-beijing.aliyuncs.com/'
    if (img) {
      let str = new RegExp('http')
      let result = str.test(img)
      if (result) {
        return img
      } else {
        return baseUrl + '/' + img
      }
    }
    return ''
  }
}

export default myFilters

